using System;

namespace codebase.UI
{
    public class Image : Control
    {
        private int _hi = 0;
        private int _lo = 0;

        public int TransparentColor = ColorExtensions.RGB16(255, 0, 255);

        public Image(int x, int y,int hi, int lo, Window parent)
        {
            Init(x, y,hi,lo, parent);
        }

        void Init(int x, int y,int hi, int lo, Window parent)
        {
            Parent = parent;

            Left = x * Parent.Parent.screen.CharacterWidth;
            Top = y * Parent.Parent.screen.CharacterHeight;
            Left += Parent.Left;
            Top += Parent.Top;

            _hi = hi;
            _lo = lo;
        }

        protected override void DrawAll()
        {
            Draw();
        }

        protected override void Draw()
        {
#if !PC
            /*Parent.Parent.screen.SPE.Transparency(1);
            Parent.Parent.screen.SPE.TransparentColor(TransparentColor);
            Parent.Parent.screen.SPE.SetByteAddress(_hi, _lo);
            Parent.Parent.screen.SPE.DisplayImageRAW(Left + Parent.Left, Top + Parent.Top);
            Parent.Parent.screen.SPE.Transparency(0);*/
#endif
        }
    }
}
